﻿using Compass.Wasm.Shared.Categories;

namespace Compass.Wasm.Shared.Wms;
//入库记录，包含有采购订单入库和非采购订单入库
public class StockInDto : BaseDto
{
    private Guid cargoId;
    public Guid CargoId { get => cargoId; set { cargoId=value; OnPropertyChanged(); } }

    private string? poNumber;
    public string? PoNumber { get=>poNumber; set { poNumber=value;OnPropertyChanged(); } }

    private string? vendorNumber;
    public string? VendorNumber { get=> vendorNumber; set { vendorNumber=value;OnPropertyChanged(); } }
    //采购价格，如果价格为0，则使用Cargo的LastPrice
    private double price;
    public double Price { get => price; set { price=value; OnPropertyChanged(); } }
    //在途数量
    private double transitQuantity;
    public double TransitQuantity { get => transitQuantity; set { transitQuantity=value; OnPropertyChanged(); } }

    //入库数量
    private double quantity;
    public double Quantity { get => quantity; set { quantity=value; OnPropertyChanged(); } }
    //预期到货日期
    private DateTime? expectedTime;
    public DateTime? ExpectedTime { get => expectedTime; set { expectedTime=value; OnPropertyChanged(); } }
    //入库日期
    private DateTime? inTime;
    public DateTime? InTime { get => inTime; set { inTime=value; OnPropertyChanged(); } }
    //盘点人
    public Guid operatorId;
    public Guid OperatorId { get => operatorId; set { operatorId=value; OnPropertyChanged(); } }

    private string? remarks;//无采购订单入库备注
    public string? Remarks { get => remarks; set { remarks = value; OnPropertyChanged(); } }


    #region 额外属性1，查询时赋值
    private string mtlNumber;//物料编码
    public string? MtlNumber { get => mtlNumber; set { mtlNumber=value; OnPropertyChanged(); } }
    private string? description;//中文描述
    public string? Description { get => description; set { description = value; OnPropertyChanged(); } }
    //库存
    private double inventory;
    public double Inventory { get => inventory; set { inventory=value; OnPropertyChanged(); } }
    //在途数量
    private double transitIn;
    public double TransitIn { get => transitIn; set { transitIn=value; OnPropertyChanged(); } }
    //待领料数量
    private double transitOut;
    public double TransitOut { get => transitIn; set { transitIn=value; OnPropertyChanged(); } }
    //库存紧缺
    private bool shortAge;
    public bool ShortAge { get => shortAge; set { shortAge=value; OnPropertyChanged(); } }
    private Unit_e unit;//计量单位
    public Unit_e Unit { get => unit; set { unit=value; OnPropertyChanged(); } }//PCS
    private string? location;//库位编号
    public string? Location { get => location; set { location = value; OnPropertyChanged(); } }
    private string? userName;
    public string? Operator { get => userName; set { userName=value; OnPropertyChanged(); } }
    #endregion

    #region 额外属性2，本次入库数量
    private double tempQuantity;
    public double TempQuantity { get => tempQuantity; set { tempQuantity=value; OnPropertyChanged(); } }
    #endregion
}